#ifndef ImageToBlobFilter_h
#define ImageToBlobFilter_h

#include "itkImage.h"
#include <itkVector.h>
#include "itkBlobSpatialObject.h"
#include "itkSpatialObjectPoint.h"
#include "itkImageRegionIteratorWithIndex.h"

namespace FPTK{


template<class PixelType,unsigned int Dimension>
class ImageToBlobFilter
{
public:

  typedef itk::BlobSpatialObject<Dimension> BlobType;
  typedef itk::SpatialObjectPoint<Dimension> BlobPointType;
  typedef itk::Image< PixelType, Dimension >  ImageType;
  typedef itk::Vector< double, ImageType::ImageDimension > vector;

typedef typename BlobType::Pointer BlobPointer;
 typedef typename ImageType::SizeType ImageTypeSizeType;
  typedef typename ImageType::Pointer ImageTypePointer;

ImageToBlobFilter(ImageTypePointer _image);
ImageToBlobFilter();
~ImageToBlobFilter();
int SetInput(ImageTypePointer _image);
int SetName(char *_filename);
char *GetName();
int Update();
BlobPointer GetBlob();

private:
char* filename;
ImageTypeSizeType size;
ImageTypePointer image;
BlobPointer blob;
};
}//end of FPTK namespace

#include "ImageToBlobFilter.cxx"

#endif